Repository navigation
[Confluence] get_all_pages_from_space: honor content_type, skip None params - #1720
Merged
gonchik merged 1 commit intoNov 15, 2026
Conversation
…ne parameters get_all_pages_from_space(space, status=None, expand=..., content_type="blogpost") sent type=page along with content_type=blogpost and status=None as literal query parameters, so a request for blog posts asked for pages. content_type now selects the type, and parameters set to None are not sent, on both Server and Cloud. The docs describe the generator return. Refs atlassian-api#1708
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1720 +/- ##
=======================================
Coverage 65.48% 65.49%
=======================================
Files 107 107
Lines 19436 19440 +4
Branches 2129 2129
=======================================
+ Hits 12728 12732 +4
Misses 6001 6001
Partials 707 707 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1708
#1708 had two bugs behind it. The first hid the second.
1. Already fixed on master (784d1d3), not yet released. In 5.0.5 the Cloud method requested
contentinstead ofrest/api/content, so the call returned nothing. That is the empty loop in the report.2. Still on master, fixed here. With the path corrected, the same call from the report:
get_all_pages_from_space(space, start=0, limit=50, status=None, expand="version", content_type="blogpost")requests
rest/api/content?spaceKey=KEY&type=page&start=0&limit=50&status=None&expand=version&content_type=blogpostcontent_typeis ignored, so a request for blog posts returns pagesstatus=Noneis sent as a literal query parameterNothing errors, which is why it went unnoticed: the reporter never got results back to see they were the wrong type.
Now
content_typeselects the type and parameters set toNoneare not sent, on Server and Cloud. The docs describe the generator return.Tests: one new test each for Server and Cloud; both fail without the change.